package cn.qn.moudle.image;

import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.Table;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author Jeet
 * @Date 2019年5月29日 11:19:36
 * @Description 统一图片处理表
 */
@Entity(name = "image")
@Data
@Table(appliesTo  = "image",comment="系统图片")
public class Image implements Serializable{
    private static final long serialVersionUID = 4362430913562848374L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id" ,columnDefinition="int(11) COMMENT '主键'")
    private Integer id;


    @Column(name = "path" ,columnDefinition="varchar(255) COMMENT '路径'")
    private String path;

    @Column(name = "create_time",columnDefinition="datetime COMMENT '创建时间'")
    @Temporal(TemporalType.TIMESTAMP)
    @CreationTimestamp
    private Date createTime;

    public Image(){

    }
    public Image(String path){
        this.path = path;
    }
}
